@extends('admin::layouts.master')
@section('title')
    权益列表
@endsection
@section('tab')
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body ">
                        <form class="layui-form layui-col-space5">
                            <div class="layui-input-inline layui-show-xs-block" style="width: 300px; ">
                                <input type="text" name="name" placeholder="权益名称" value="{{$arr_search['name']}}" autocomplete="off" class="layui-input"></div>
                            <div class="layui-input-inline layui-show-xs-block">
                                <button class="layui-btn" lay-submit="" lay-filter="sreach">
                                    <i class="layui-icon">&#xe615;</i>
                                </button>
                                <a class="layui-btn layui-btn-small" onclick="location.reload()" title="刷新">
                                    <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
                                </a>
                            </div>
                        </form>
                    </div>
                    <div class="layui-card-body">
                        <button class="layui-btn" onclick="xadmin.open('添加权益','{{route("admin_grade_create_equities")}}' , 800 , 500 )">
                            <i class="layui-icon"></i>添加</button>
                    </div>
                    <div class="layui-card-body layui_overflow_y ">
                        <table class="layui-table layui-form">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>权益名称</th>
                                <th>权益logo</th>
                                <th>排序</th>
                                <th>说明</th>
                                <th>操作</th></tr>
                            </thead>
                            <tbody>
                            @foreach($data as $key=>$value)
                                <tr>
                                    <td>{{ $value['id'] }}</td>
                                    <td>{{ $value['name'] }}</td>
                                    <td><img src="{{ $value['full_src'] }}" style="width: 50px; height: 50px;"></td>
                                    <td>{{ $value['sort'] }}</td>
                                    <td>{{ $value['remark'] }}</td>
                                    <td class="td-manage">
                                        <a title="编辑" class="layui-btn" onclick="xadmin.open('编辑权益','{{route("admin_grade_edit_equities",["id"=>$value["id"]])}}', 800 , 500)" href="javascript:;">
                                            编辑</a>
                                        <a title="删除" class="layui-btn layui-btn-danger" data-href="{{route('admin_grade_del_equities',['id'=>$value['id']])}}" data-title="确定删除吗？请谨慎操作" href="javascript:;" class="btn btn-warning ajax_member_del">
                                            删除
                                        </a>
                                         <a title="编辑权益" class="layui-btn layui-btn-warm" onclick="xadmin.open('编辑权益','{{route("admin_grade_create_gifts",["id"=>$value["id"]])}}', 900 , 600)" href="javascript:;">
                                            编辑权益
                                        </a>
                                    </td>
                                </tr>
                            @endforeach
                            @if(empty($data))
                                <td colspan="6" align="center">暂无数据</td>
                            @endif
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-card-body ">
                        <div class="page">
                            {{$page_link}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection


@section('tab_js')
    <script>

        

    </script>
@endsection




